<?php global $user; ?>
<div class="login">
  <?php
  if (user_is_logged_in()) {
    $result = get_fullname_by_uid($user->uid);
    $name = (isset($result[0]) && !empty($result[0])) ? $result[0] : $user->name;
    ?>
    <a href="<?php print url('user/' . $user->uid . '/edit'); ?>"><?php print t('Welcome') . ', ' . $name; ?></a> |
    <a href="<?php print url('user/' . $user->uid . '/edit'); ?>"><?php print t('Change profile') . ' ' . $name; ?></a> |
    <a href="<?php print url('user/logout'); ?>"><?php print t('Logout'); ?></a>
    <?php
  } else {
    ?>
    <a href="javascript:void()" name="modal"><?php print t('Login'); ?></a> | <a href="<?php print url('user/register'); ?>"><?php print t('Register and Submit CV'); ?></a>
  <?php }
  ?>
</div>